feat(billing): wire pymthouse getPlans + subscribe checkout - #455
feat(billing): wire pymthouse getPlans + subscribe checkout#455eliteprox wants to merge 5 commits into
Conversation
Expose BPP plan catalogue and optional M2M checkout through the PymthouseAdapter so agent/BFF callers can list plans and start Stripe Checkout without inventing marketplace UI or last-mile credit APIs.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
Drop the hand-rolled M2M checkout helper; adapter.subscribe and error mapping now go through PmtHouseClient / PmtHouseError from builder-sdk.
|
Follow-up pushed: subscribe now uses Related:
|
builder-sdk#50 merged and published; replace the git branch pin so createBillingCheckout comes from the npm release.
|
Pinned to published |
Move off the interim 0.6.2 pin to the published Sonar/CI security patch.
|
Bumped pin to published |
Builder checkout (pymthouse#386) returns 409 when a customer already has an active subscription or needs a payment method before plan change. Map that to CONFLICT instead of treating it as a transient 503.
|
Follow-up for pymthouse#386: Builder |
Summary
getPlansonPymthouseAdaptervialistBillingProducts→mapBillingProductsToPlans(active products only).subscribe?via SDKcreateBillingCheckout(@pymthouse/builder-sdk@0.6.3) → BuilderPOST /api/v1/apps/{clientId}/billing/checkout.provider_adapters):GET /api/v1/billing/{provider}/plans,POST /api/v1/billing/{provider}/subscribe.providerPlanIdstarts provider checkout before persisting the local row (no orphan on checkout failure) and returnscheckoutUrl/subscriptionRef.CONFLICT(not 503).docs/pymthouse-integration.md.Test plan
@pymthouse/builder-sdk@0.6.3provider_adaptersON + pymthouse M2M env,GET /api/v1/billing/pymthouse/plansreturns live productsPOST …/subscribewith a realplanIdreturns a Stripe Checkout URL